package com.itheima.io1.mytest2;

import java.io.*;
import java.util.ArrayList;

/**
 * @author zhangbaiyan
 * @date 2024-09-21 20:30
 * @description:
 * @version:
 */
public class test2 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream(new File("su.txt")));
        ArrayList<Student> list = (ArrayList<Student>) ois.readObject();
        for (Student student : list) {
            System.out.println(student);

        }
        ois.close();
    }
}
